TAOS Tips

by Teresa Dominguez

Q: One of my TAOS customers wants to create a report with a header on each page except the final page. He tried the following code:

The problem occurs when the PAGE function reports that TAOS is printing on a new page. By this time it's already too late because PAGE( ) increases as soon as there is data for a next page. Anything sent to the output device will be printed after that text. In the above example, the header data is printed after the first line of data.

Any idea on how this can be accomplished (user text before all other data)?

A: If you use a variable for the header string, then you can change it (the header string) as needed. Try the following example:

Or, your example will work with a few changes:

Q: I'm working with an integer data type that expands to a Julian date. I need to access this in a choose/record gosub= segment so I can do a WHERE on the date. If I just do the display, TAOS handles the conversion fine, but in a choose/record statement it's not converted. I have a program that converts 3-byte packed MAI dates, but it crashes with this field because it's defined as 4. I've tried using the date( ) function, but it either doesn't work, or I can't see how to make it work. Can you help me?

A: Yes. Suppose your alias has a field called DATE which is I(4). Your code may look like:

Q: I am changing a procedure that currently uses a choose/record with variable information in it to a choose/record/form. My question is, how do I load fields in the choose/record/form with variable information, or fields from another Data Dictionary?

A: Try something like this:


BASIS Main Menu | Advantage Menu
Copyright BASIS International Ltd. All rights reserved.
Comments and questions: webmaster@basis.com